package org.dyndns.opendemogroup.optimizer;

import java.util.Random;

// TODO: Some selections do not need the population fitness to be computed on
// each loop and, by extension, to have the population sorted. Tournament
// selection is the best example. There should be a way for the ISelection
// implementation to communicate this to the engine and then Tournament can
// invoke member.decode ( problem ) on its own.

// TODO: Some selections depend on the order of operations (i.e. SlidingBias),
// so there should be a way to communicate this back to the engine so that it
// could run operations sequentially or at random.
/**
 * Represents the abstraction to separate the different kinds of Population
 * selection for the purposes of performing some operations on some Member
 * instances.
 */
public interface ISelection
{
	Pair<Member, Member> select ( Random randomSource, Population population,
			IOptimizationProblem problem, int loopIndex );

	void reset ( Random randomSource, Population population,
			IOptimizationProblem problem );
}
